package com.molin.threadTest.blockingQueueTest;

import java.util.concurrent.ArrayBlockingQueue;

public class Foodie extends Thread {
    public ArrayBlockingQueue<String> list;
    public Foodie(ArrayBlockingQueue<String> list) {
        this.list=list;
    }

    @Override
    public void run() {
        while (true) {
            try {
                System.out.println("吃货吃汉堡。。");
                list.take();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

    }
}
